﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucHangMoiVe.ascx.cs" Inherits="UserControl_Nice_ucHangMoiVe" %>
<%@ Register assembly="CollectionPager" namespace="SiteUtils" tagprefix="cc1" %>
<asp:DataList ID="DataList1" runat="server" DataKeyField="MaSanPham"
    Width="100%" RepeatColumns="4">
    <AlternatingItemStyle Font-Bold="False" Font-Italic="False" 
        Font-Overline="False" Font-Strikeout="False" Font-Underline="False" 
        HorizontalAlign="Left" />
    <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" 
        Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" />
    <ItemTemplate>
        <div class="product">
            <a href='ProductDetail.aspx?id_product=<%# Eval("MaSanPham") %>'>
                <asp:Image ID="Image15" runat="server" ImageUrl='<%# Eval("HinhAnh") %>' />
            </a>
            <div class="productname">
                Tên SP:
                <asp:Label ID="Label1" runat="server" Text='<%# Eval("MaSanPham") %>'></asp:Label>
            </div>
            <div class="productprice">
                Giá:
                <asp:Label ID="Label2" runat="server" Text='<%# Eval("GiaBan", "{0:N0} VNĐ") %>'></asp:Label>
            </div>
            <div class="productview">
                <a href="ProductDetail.aspx?id_product=<%# Eval("MaSanPham") %>">Xem chi tiết</a></div>
        </div>
    </ItemTemplate>
    <SelectedItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" 
        Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" />
    <SeparatorStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" 
        Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" />
</asp:DataList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
    
    
    
    SelectCommand="SELECT dbo.SanPham.MaSanPham, dbo.SanPham.GiaBan, dbo.SanPham.NgayCapNhat, dbo.SanPham.LoaiID, dbo.SanPham.Xoa, dbo.SanPham.GioiThieu, dbo.SanPham.ChucNangID, dbo.SanPham.NhanHieuID, dbo.SanPham.Hot, dbo.SanPham.Sale, dbo.SanPham.GiaCu, dbo.SanPham.HangMoiVe, (SELECT TOP (1) URL FROM dbo.HinhAnh WHERE (MaSanPham = dbo.SanPham.MaSanPham)) AS hinhanh, dbo.Loai.TenLoai FROM dbo.SanPham INNER JOIN dbo.Loai ON dbo.SanPham.LoaiID = dbo.Loai.ID WHERE sanpham.hangmoive=1">
</asp:SqlDataSource>
<cc1:CollectionPager ID="CollectionPager1" runat="server" PageSize="24" 
    ResultsFormat="">
</cc1:CollectionPager>
<asp:Label ID="Label3" runat="server" Text="Label"></asp:Label>